package com.mew.slots.core.common.handler;

import cn.hutool.core.util.StrUtil;
import lombok.*;

import java.io.Serializable;


@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(of = {"roomId"})
@Builder
public class RoomBO implements Serializable {
    private int roomId; //用户ID
    private int minGoldNumber; //进入最小金币
    private int lineNumber;//线数
    private String betStr;  //进入房间 加载 重连房间加载
    private int[] betArray;

    public void setBetStr(String betStr){
        this.betArray = StrUtil.splitToInt(betStr, ',');
        this.betStr = betStr;
    }

    public int getMinBet(){
        return betArray[0];
    }

    public int getMaxBet(){
        return betArray[betArray.length -1];
    }
}
